Java megzine: Java at sea by Michael Clarck & Manish Sahu

Java megzine: Java at sea by Michael Clarck & Manish Sahu

Author:Michael Clarck & Manish Sahu [Clarck, Michael]
Language: eng
Format: azw3
Publisher: UNKNOWN
Published: 2018-12-13T16:00:00+00:00


In fact, this effect is caused by the Mac OS X timing subsystem, which records time only at the microsecond level, which causes System .nanoTime() to return results that are whole thousands

NOT THE NORM

Typical values for performance metrics obtained from a JVM do

not usually form a normal distribution.

of nanoseconds

(because 1,000 ns

equals 1 mu). This

shows how impor

tant it is to have an

awareness of the

hardware and OSblogfeatures that can

affect the perfor

mance numbers

produced on a

specific platform.45

On other operating systems and hardware, the granularity of nanoTime() is actually nanoseconds. From here on, we’ll use the same hardware and Java Virtual Machine (JVM), but we’ll run under Ubuntu Linux, so we can obtain the finer precision we need for individual runs.

The Distribution of Results One very important aspect of gathering good numbers for performance tuning is to understand the distribution of performancesensitive results. In particular, typical values for performance metrics obtained from a JVM do not usually form a normal distribution.

Instead, a performance metric, such as the time taken to execute a method, is typically composed



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.